{include file="public/layout"/}
<style type="text/css">
    html, body {
        overflow: visible;
    }
</style>
<body style="background-color: #FFF; overflow: auto;">
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-card layui-col-md12">
            <div class="layui-card-header">
                手机APP设置
            </div>
            <div class="layui-card-body" pad15>
                <div class="layui-form form-label-w10" lay-filter="" style="margin-top:20px">
                    <span style="color:#333">绑定微信开放平台</span>
                    <hr/>
                    <div style="color:#999;height:60px;line-height:60px">请先在微信开放平台(open.weixin.qq.com)创建移动应用
                        用于微信登录、微信分享及微信支付
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">AppID：</label>
                        <div class="layui-input-inline" style="width:200px">
                            <input type="hidden" name="id" value="{$info.id}" class="layui-input">
                            <input type="text" name="appid" value="{$info.appid}" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">登录微信小程序平台(mp.weixin.qq.com)[开发]-[基本配置]中查找</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">AppSecret：</label>
                        <div class="layui-input-inline" style="width:280px">
                            <input type="text" name="appsecret" value="{$info.appsecret}" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">登录微信小程序平台(mp.weixin.qq.com)[开发]-[基本配置]中查找</div>
                    </div>

                    <span style="color:#333">安装包地址</span><hr/>
                    <div class="layui-form-item">
                        <label class="layui-form-label">Android安装地址：</label>
                        <div class="layui-input-inline" style="width:340px">
                            <input type="text" name="androidurl" value="{$info.androidurl}" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">可上传到站点根目录然后设置安装包地址{:getCurUrl()}/安装包文件名.apk</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">IOS安装地址：</label>
                        <div class="layui-input-inline" style="width:340px">
                            <input type="text" name="iosurl" value="{$info.iosurl}" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">上架后在应用商店中复制链接地址</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户下载地址：</label>
                        <div class="layui-form-mid">{:getCurUrl()}/?s=/Index/downloadapp</div>
                    </div>
                    <span style="color:#333">更新说明</span><hr/>
                    <div class="layui-form-item">
                        <label class="layui-form-label" style="width:130px">更新内容：</label>
                        <div class="layui-input-inline">
                            <textarea type="text" name="describe" class="layui-textarea">{$info.describe}</textarea>
                        </div>
                        <div class="layui-form-mid layui-word-aux"></div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">版本号：</label>
                        <div class="layui-input-inline" style="width:340px">
                            <input type="text" name="edition_number" value="{$info.edition_number}" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">联系技术人员获取</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">版本号名称：</label>
                        <div class="layui-input-inline" style="width:340px">
                            <input type="text" name="edition_name" value="{$info.edition_name}" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">联系技术人员获取</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label" style="width:130px">强制更新：</label>
                        <div class="layui-input-inline" style="width:300px">
                            <input type="radio" name="edition_force" title="否" value="0" {if !$info['edition_force']}checked{/if} />
                            <input type="radio" name="edition_force" title="是" value="1" {if $info['edition_force']}checked{/if} />
                        </div>
                        <div class="layui-form-mid layui-word-aux"></div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label" style="width:130px">是否发行：</label>
                        <div class="layui-input-inline" style="width:300px">
                            <input type="radio" name="edition_issue" title="否" value="0" {if !$info['edition_issue']}checked{/if} />
                            <input type="radio" name="edition_issue" title="是" value="1" {if $info['edition_issue']}checked{/if} />
                        </div>
                        <div class="layui-form-mid layui-word-aux">为了控制上架应用市场审核时不能弹出热更新框</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-inline" style="width:500px">
                            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="submit_wx">保 存</button>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use(function () {
        layui.form.on('submit(submit_wx)', function (obj) {
            var field = obj.field
            $.post('', obj.field, function (data) {
                dialog(data.msg, data.status, data.url);
            })
        })
        layui.upload.render({
            elem: '#uploadjstxt', //绑定元素
            url: "{:url('uploadjstxt')}", //上传接口
            exts: 'txt',
            done: function (res) {
                //上传完毕回调
                console.log(res)
                dialog(res)
            },
            error: function () {
                //请求异常回调
            }
        });
    })
</script>
</body>
</html>